#include <stdio.h>
#include <string.h>
#include <stdbool.h>

char output[80] = {0};
bool isExist(char c){
	for(int i = 0; i < strlen(output); i++){
		if(c == output[i]){
			return true;
		}
	}
	return false;
}
int main()
{
	char N1[80] = {0}, N2[80] = {0};
	int i = 0, j = 0, size = 0;
	scanf("%s", &N1);
	scanf("%s", &N2);

	while(N1[i] != '\0' && N2[j] != '\0'){
		//全部转换成大写
		if(N1[i] != N2[j]){
			if(N1[i] >= 'a' && N1[i] <= 'z'){
				N1[i] -= 32;	
			}
			//已存在则不输出
			if(!isExist(N1[i])){
				output[size++] = N1[i];
			}
			i++;
			continue;
		}else{
			i++;
			j++;
		}
	}
	printf("%s\n", output);
	return 0;
}
